# Maintainer: Christian Kampka <christian@kampka.net>
pkgname=torsocks
pkgver=2.3.0
pkgrel=0
pkgdesc="Wrapper to safely torify applications"
url="https://gitweb.torproject.org/torsocks.git"
arch="all"
license="GPL-2.0"
depends="tor"
makedepends="$depends_dev autoconf automake libtool"
subpackages="$pkgname-doc"
source="https://people.torproject.org/~dgoulet/${pkgname}/${pkgname}-${pkgver}.tar.xz"

builddir="${srcdir}/${pkgname}-${pkgver}"

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

check() {
	cd "$builddir"
	make check
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
}

sha512sums="4888caaffdcfebf3673e14f3491eae6aa84ca0a4a2a812ba7bdac2abb471307e89a3c5cffe7691fb6f190c7bd9ea455ee9a223d909a39152be8524f590be2031  torsocks-2.3.0.tar.xz"
